Same as show_collision, but for every live instance of every object type at once - a single project-wide switch, not tied to whichever instance calls it.
Works differently on Game Boy - The Game Boy draws no collision outlines, so this does nothing there.
Works differently on Game Boy Color - The Game Boy Color draws no collision outlines, so this does nothing there.
Sega Genesis: not built yet
On other consoles this differs: see Side by side and How the consoles differ.
show_collision_all(on)| Name | Type |
|---|---|
on | bool |
Nothing.
Same as show_collision, but for every live instance of every object type at once - a single project-wide switch, not tied to whichever instance calls it.
show_collision_all(true);Turns the overlay on for every instance in the project, from wherever this runs - typically once, from a title-screen or debug-controller object's Create event, not every frame from every instance.
Call this once, not every frame - it just sets one flag. The engine itself sweeps every object type's own live instances every frame afterward and draws the ones the flag says to, the same shape of per-object-type sweep the engine already performs for sprite's own default drawing.
That sweep only exists in a project that calls show_collision_all somewhere at all - a project that never does pays nothing for this feature, not even the sweep itself. Once a project does call it anywhere, though, the sweep runs every frame for every object type from then on, checking the flag before touching any instance - a small, per-object-type (never per-instance) cost from that point on, whether the flag is currently on or off. This is not the same as an event that simply does not exist to fire when unused - see show_collision's own "Cost" section for the fuller account.
With many live instances on screen, expect the same per-box hardware limits show_collision describes, just as many times over as there are boxes drawn at once - the busier the room, the sooner a box or two stops drawing (never a crash) rather than every single one competing forever.
Call this once (a title-screen debug object's Create event, say), not every frame from every instance - it just sets one flag; the engine itself sweeps every object type's own live instances every frame afterward and draws the ones the flag says to (set up per object type only in a project that calls this anywhere). Once bound, that per-type sweep runs every frame regardless of whether the flag is currently on, checking the flag before touching any instance - a small, per-OBJECT-TYPE (never per-instance) cost from the first call onward, not the zero-instantiated-template bar a project that never calls this reaches. With many live instances on screen, expect the same hardware limits show_collision's own note describes, just multiplied by however many boxes are drawn at once - the busier the room, the sooner a box or two silently stops drawing rather than the ROM crashing.